
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
  <head>
    <meta http-equiv="X-UA-Compatible" content="IE=Edge" />
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Triaging tickets &#8212; Django 2.2.12.dev20200304094918 documentation</title>
    <link rel="stylesheet" href="../../_static/default.css" type="text/css" />
    <link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
    <script type="text/javascript" id="documentation_options" data-url_root="../../" src="../../_static/documentation_options.js"></script>
    <script type="text/javascript" src="../../_static/jquery.js"></script>
    <script type="text/javascript" src="../../_static/underscore.js"></script>
    <script type="text/javascript" src="../../_static/doctools.js"></script>
    <script type="text/javascript" src="../../_static/language_data.js"></script>
    <link rel="index" title="Index" href="../../genindex.html" />
    <link rel="search" title="Search" href="../../search.html" />
    <link rel="next" title="Writing code" href="writing-code/index.html" />
    <link rel="prev" title="Reporting bugs and requesting features" href="bugs-and-features.html" />



 
<script type="text/javascript" src="../../templatebuiltins.js"></script>
<script type="text/javascript">
(function($) {
    if (!django_template_builtins) {
       // templatebuiltins.js missing, do nothing.
       return;
    }
    $(document).ready(function() {
        // Hyperlink Django template tags and filters
        var base = "../../ref/templates/builtins.html";
        if (base == "#") {
            // Special case for builtins.html itself
            base = "";
        }
        // Tags are keywords, class '.k'
        $("div.highlight\\-html\\+django span.k").each(function(i, elem) {
             var tagname = $(elem).text();
             if ($.inArray(tagname, django_template_builtins.ttags) != -1) {
                 var fragment = tagname.replace(/_/, '-');
                 $(elem).html("<a href='" + base + "#" + fragment + "'>" + tagname + "</a>");
             }
        });
        // Filters are functions, class '.nf'
        $("div.highlight\\-html\\+django span.nf").each(function(i, elem) {
             var filtername = $(elem).text();
             if ($.inArray(filtername, django_template_builtins.tfilters) != -1) {
                 var fragment = filtername.replace(/_/, '-');
                 $(elem).html("<a href='" + base + "#" + fragment + "'>" + filtername + "</a>");
             }
        });
    });
})(jQuery);</script>

  </head><body>

    <div class="document">
  <div id="custom-doc" class="yui-t6">
    <div id="hd">
      <h1><a href="../../index.html">Django 2.2.12.dev20200304094918 documentation</a></h1>
      <div id="global-nav">
        <a title="Home page" href="../../index.html">Home</a>  |
        <a title="Table of contents" href="../../contents.html">Table of contents</a>  |
        <a title="Global index" href="../../genindex.html">Index</a>  |
        <a title="Module index" href="../../py-modindex.html">Modules</a>
      </div>
      <div class="nav">
    &laquo; <a href="bugs-and-features.html" title="Reporting bugs and requesting features">previous</a>
     |
    <a href="../index.html" title="Django internals" accesskey="U">up</a>
   |
    <a href="writing-code/index.html" title="Writing code">next</a> &raquo;</div>
    </div>

    <div id="bd">
      <div id="yui-main">
        <div class="yui-b">
          <div class="yui-g" id="internals-contributing-triaging-tickets">
            
  <div class="section" id="s-triaging-tickets">
<span id="triaging-tickets"></span><h1>Triaging tickets<a class="headerlink" href="#triaging-tickets" title="Permalink to this headline">¶</a></h1>
<p>Django uses <a class="reference external" href="https://code.djangoproject.com/">Trac</a> for managing the work on the code base. Trac is a
community-tended garden of the bugs people have found and the features people
would like to see added. As in any garden, sometimes there are weeds to be
pulled and sometimes there are flowers and vegetables that need picking. We need
your help to sort out one from the other, and in the end we all benefit
together.</p>
<p>Like all gardens, we can aspire to perfection but in reality there’s no such
thing. Even in the most pristine garden there are still snails and insects.
In a community garden there are also helpful people who – with the best of
intentions – fertilize the weeds and poison the roses. It’s the job of the
community as a whole to self-manage, keep the problems to a minimum, and
educate those coming into the community so that they can become valuable
contributing members.</p>
<p>Similarly, while we aim for Trac to be a perfect representation of the state
of Django’s progress, we acknowledge that this simply will not happen. By
distributing the load of Trac maintenance to the community, we accept that
there will be mistakes. Trac is “mostly accurate”, and we give allowances for
the fact that sometimes it will be wrong. That’s okay. We’re perfectionists
with deadlines.</p>
<p>We rely on the community to keep participating, keep tickets as accurate as
possible, and raise issues for discussion on our mailing lists when there is
confusion or disagreement.</p>
<p>Django is a community project, and every contribution helps. We can’t do this
without <strong>you</strong>!</p>
<div class="section" id="s-triage-workflow">
<span id="triage-workflow"></span><h2>Triage workflow<a class="headerlink" href="#triage-workflow" title="Permalink to this headline">¶</a></h2>
<p>Unfortunately, not all bug reports and feature requests in the ticket tracker
provide all the <a class="reference internal" href="bugs-and-features.html"><span class="doc">required details</span></a>. A number of
tickets have patches, but those patches don’t meet all the requirements of a
<a class="reference internal" href="writing-code/submitting-patches.html#patch-style"><span class="std std-ref">good patch</span></a>.</p>
<p>One way to help out is to <em>triage</em> tickets that have been created by other
users.</p>
<p>Most of the workflow is based around the concept of a ticket’s
<a class="reference internal" href="#triage-stages"><span class="std std-ref">triage stages</span></a>. Each stage describes where in its
lifetime a given ticket is at any time. Along with a handful of flags, this
attribute easily tells us what and who each ticket is waiting on.</p>
<p>Since a picture is worth a thousand words, let’s start there:</p>
<a class="reference internal image-reference" href="../../_images/triage_process.svg"><img alt="Django's ticket triage workflow" height="501" src="../../_images/triage_process.svg" width="400" /></a>
<p>We’ve got two roles in this diagram:</p>
<ul class="simple">
<li>Committers: people with commit access who are responsible for making the
final decision to merge a patch.</li>
<li>Ticket triagers: anyone in the Django community who chooses to
become involved in Django’s development process. Our Trac installation
is intentionally left open to the public, and anyone can triage tickets.
Django is a community project, and we encourage <a class="reference internal" href="#how-can-i-help-with-triaging"><span class="std std-ref">triage by the
community</span></a>.</li>
</ul>
<p>By way of example, here we see the lifecycle of an average ticket:</p>
<ul class="simple">
<li>Alice creates a ticket and sends an incomplete pull request (no tests,
incorrect implementation).</li>
<li>Bob reviews the pull request, marks the ticket as “Accepted”, “needs tests”,
and “patch needs improvement”, and leaves a comment telling Alice how the
patch could be improved.</li>
<li>Alice updates the pull request, adding tests (but not changing the
implementation). She removes the two flags.</li>
<li>Charlie reviews the pull request and resets the “patch needs improvement”
flag with another comment about improving the implementation.</li>
<li>Alice updates the pull request, fixing the implementation. She removes the
“patch needs improvement” flag.</li>
<li>Daisy reviews the pull request and marks the ticket as “Ready for checkin”.</li>
<li>Jacob, a committer, reviews the pull request and merges it.</li>
</ul>
<p>Some tickets require much less feedback than this, but then again some tickets
require much much more.</p>
</div>
<div class="section" id="s-triage-stages">
<span id="s-id1"></span><span id="triage-stages"></span><span id="id1"></span><h2>Triage stages<a class="headerlink" href="#triage-stages" title="Permalink to this headline">¶</a></h2>
<p>Below we describe in more detail the various stages that a ticket may flow
through during its lifetime.</p>
<div class="section" id="s-unreviewed">
<span id="unreviewed"></span><h3>Unreviewed<a class="headerlink" href="#unreviewed" title="Permalink to this headline">¶</a></h3>
<p>The ticket has not been reviewed by anyone who felt qualified to make a
judgment about whether the ticket contained a valid issue, a viable feature,
or ought to be closed for any of the various reasons.</p>
</div>
<div class="section" id="s-accepted">
<span id="accepted"></span><h3>Accepted<a class="headerlink" href="#accepted" title="Permalink to this headline">¶</a></h3>
<p>The big gray area! The absolute meaning of “accepted” is that the issue
described in the ticket is valid and is in some stage of being worked on.
Beyond that there are several considerations:</p>
<ul>
<li><p class="first"><strong>Accepted + No Flags</strong></p>
<p>The ticket is valid, but no one has submitted a patch for it yet. Often this
means you could safely start writing a patch for it. This is generally more
true for the case of accepted bugs than accepted features. A ticket for a bug
that has been accepted means that the issue has been verified by at least one
triager as a legitimate bug - and should probably be fixed if possible. An
accepted new feature may only mean that one triager thought the feature would
be good to have, but this alone does not represent a consensus view or imply
with any certainty that a patch will be accepted for that feature. Seek more
feedback before writing an extensive patch if you are in doubt.</p>
</li>
<li><p class="first"><strong>Accepted + Has Patch</strong></p>
<p>The ticket is waiting for people to review the supplied patch. This means
downloading the patch and trying it out, verifying that it contains tests
and docs, running the test suite with the included patch, and leaving
feedback on the ticket.</p>
</li>
<li><p class="first"><strong>Accepted + Has Patch + Needs …</strong></p>
<p>This means the ticket has been reviewed, and has been found to need further
work. “Needs tests” and “Needs documentation” are self-explanatory. “Patch
needs improvement” will generally be accompanied by a comment on the ticket
explaining what is needed to improve the code.</p>
</li>
</ul>
</div>
<div class="section" id="s-ready-for-checkin">
<span id="ready-for-checkin"></span><h3>Ready For Checkin<a class="headerlink" href="#ready-for-checkin" title="Permalink to this headline">¶</a></h3>
<p>The ticket was reviewed by any member of the community other than the person
who supplied the patch and found to meet all the requirements for a
commit-ready patch. A committer now needs to give the patch a final
review prior to being committed. See the
<a class="reference internal" href="new-contributors.html#new-contributors-faq"><span class="std std-ref">New contributors’ FAQ</span></a> for “My ticket has been in
RFC forever! What should I do?”</p>
</div>
<div class="section" id="s-someday-maybe">
<span id="someday-maybe"></span><h3>Someday/Maybe<a class="headerlink" href="#someday-maybe" title="Permalink to this headline">¶</a></h3>
<p>This stage isn’t shown on the diagram. It’s used sparingly to keep track of
high-level ideas or long term feature requests.</p>
<p>These tickets are uncommon and overall less useful since they don’t describe
concrete actionable issues. They are enhancement requests that we might
consider adding someday to the framework if an excellent patch is submitted.
They are not a high priority.</p>
</div>
</div>
<div class="section" id="s-other-triage-attributes">
<span id="other-triage-attributes"></span><h2>Other triage attributes<a class="headerlink" href="#other-triage-attributes" title="Permalink to this headline">¶</a></h2>
<p>A number of flags, appearing as checkboxes in Trac, can be set on a ticket:</p>
<div class="section" id="s-has-patch">
<span id="has-patch"></span><h3>Has patch<a class="headerlink" href="#has-patch" title="Permalink to this headline">¶</a></h3>
<p>This means the ticket has an associated
<a class="reference internal" href="writing-code/submitting-patches.html"><span class="doc">patch</span></a>. These will be reviewed
to see if the patch is “good”.</p>
<p>The following three fields (Needs documentation, Needs tests,
Patch needs improvement) apply only if a patch has been supplied.</p>
</div>
<div class="section" id="s-needs-documentation">
<span id="needs-documentation"></span><h3>Needs documentation<a class="headerlink" href="#needs-documentation" title="Permalink to this headline">¶</a></h3>
<p>This flag is used for tickets with patches that need associated
documentation. Complete documentation of features is a prerequisite
before we can check them into the codebase.</p>
</div>
<div class="section" id="s-needs-tests">
<span id="needs-tests"></span><h3>Needs tests<a class="headerlink" href="#needs-tests" title="Permalink to this headline">¶</a></h3>
<p>This flags the patch as needing associated unit tests. Again, this
is a required part of a valid patch.</p>
</div>
<div class="section" id="s-patch-needs-improvement">
<span id="patch-needs-improvement"></span><h3>Patch needs improvement<a class="headerlink" href="#patch-needs-improvement" title="Permalink to this headline">¶</a></h3>
<p>This flag means that although the ticket <em>has</em> a patch, it’s not quite
ready for checkin. This could mean the patch no longer applies
cleanly, there is a flaw in the implementation, or that the code
doesn’t meet our standards.</p>
</div>
<div class="section" id="s-easy-pickings">
<span id="easy-pickings"></span><h3>Easy pickings<a class="headerlink" href="#easy-pickings" title="Permalink to this headline">¶</a></h3>
<p>Tickets that would require small, easy, patches.</p>
</div>
<div class="section" id="s-type">
<span id="type"></span><h3>Type<a class="headerlink" href="#type" title="Permalink to this headline">¶</a></h3>
<p>Tickets should be categorized by <em>type</em> between:</p>
<ul class="simple">
<li><dl class="first docutils">
<dt>New Feature</dt>
<dd>For adding something new.</dd>
</dl>
</li>
<li><dl class="first docutils">
<dt>Bug</dt>
<dd>For when an existing thing is broken or not behaving as expected.</dd>
</dl>
</li>
<li><dl class="first docutils">
<dt>Cleanup/optimization</dt>
<dd>For when nothing is broken but something could be made cleaner,
better, faster, stronger.</dd>
</dl>
</li>
</ul>
</div>
<div class="section" id="s-component">
<span id="component"></span><h3>Component<a class="headerlink" href="#component" title="Permalink to this headline">¶</a></h3>
<p>Tickets should be classified into <em>components</em> indicating which area of
the Django codebase they belong to. This makes tickets better organized and
easier to find.</p>
</div>
<div class="section" id="s-severity">
<span id="severity"></span><h3>Severity<a class="headerlink" href="#severity" title="Permalink to this headline">¶</a></h3>
<p>The <em>severity</em> attribute is used to identify blockers, that is, issues which
should get fixed before releasing the next version of Django. Typically those
issues are bugs causing regressions from earlier versions or potentially
causing severe data losses. This attribute is quite rarely used and the vast
majority of tickets have a severity of “Normal”.</p>
</div>
<div class="section" id="s-version">
<span id="version"></span><h3>Version<a class="headerlink" href="#version" title="Permalink to this headline">¶</a></h3>
<p>It is possible to use the <em>version</em> attribute to indicate in which
version the reported bug was identified.</p>
</div>
<div class="section" id="s-ui-ux">
<span id="ui-ux"></span><h3>UI/UX<a class="headerlink" href="#ui-ux" title="Permalink to this headline">¶</a></h3>
<p>This flag is used for tickets that relate to User Interface and User
Experiences questions. For example, this flag would be appropriate for
user-facing features in forms or the admin interface.</p>
</div>
<div class="section" id="s-cc">
<span id="cc"></span><h3>Cc<a class="headerlink" href="#cc" title="Permalink to this headline">¶</a></h3>
<p>You may add your username or email address to this field to be notified when
new contributions are made to the ticket.</p>
</div>
<div class="section" id="s-keywords">
<span id="keywords"></span><h3>Keywords<a class="headerlink" href="#keywords" title="Permalink to this headline">¶</a></h3>
<p>With this field you may label a ticket with multiple keywords. This can be
useful, for example, to group several tickets of a same theme. Keywords can
either be comma or space separated. Keyword search finds the keyword string
anywhere in the keywords. For example, clicking on a ticket with the keyword
“form” will yield similar tickets tagged with keywords containing strings such
as “formset”, “modelformset”, and “ManagementForm”.</p>
</div>
</div>
<div class="section" id="s-closing-tickets">
<span id="s-id2"></span><span id="closing-tickets"></span><span id="id2"></span><h2>Closing Tickets<a class="headerlink" href="#closing-tickets" title="Permalink to this headline">¶</a></h2>
<p>When a ticket has completed its useful lifecycle, it’s time for it to be
closed. Closing a ticket is a big responsibility, though. You have to be sure
that the issue is really resolved, and you need to keep in mind that the
reporter of the ticket may not be happy to have their ticket closed (unless
it’s fixed, of course). If you’re not certain about closing a ticket, just
leave a comment with your thoughts instead.</p>
<p>If you do close a ticket, you should always make sure of the following:</p>
<ul class="simple">
<li>Be certain that the issue is resolved.</li>
<li>Leave a comment explaining the decision to close the ticket.</li>
<li>If there is a way they can improve the ticket to reopen it, let them know.</li>
<li>If the ticket is a duplicate, reference the original ticket. Also
cross-reference the closed ticket by leaving a comment in the original one
– this allows to access more related information about the reported bug
or requested feature.</li>
<li><strong>Be polite.</strong> No one likes having their ticket closed. It can be
frustrating or even discouraging. The best way to avoid turning people
off from contributing to Django is to be polite and friendly and to offer
suggestions for how they could improve this ticket and other tickets in
the future.</li>
</ul>
<p>A ticket can be resolved in a number of ways:</p>
<ul class="simple">
<li><dl class="first docutils">
<dt>fixed</dt>
<dd>Used once a patch has been rolled into Django and the issue is fixed.</dd>
</dl>
</li>
<li><dl class="first docutils">
<dt>invalid</dt>
<dd>Used if the ticket is found to be incorrect. This means that the
issue in the ticket is actually the result of a user error, or
describes a problem with something other than Django, or isn’t
a bug report or feature request at all (for example, some new users
submit support queries as tickets).</dd>
</dl>
</li>
<li><dl class="first docutils">
<dt>wontfix</dt>
<dd>Used when a someone decides that the request isn’t appropriate for
consideration in Django. Sometimes a ticket is closed as “wontfix” with a
request for the reporter to start a discussion on the <a class="reference internal" href="../mailing-lists.html#django-developers-mailing-list"><span class="std std-ref">django-developers</span></a>
mailing list if they feel differently from the rationale provided by the
person who closed the ticket. Other times, a mailing list discussion
precedes the decision to close a ticket. Always use the mailing list to
get a consensus before reopening tickets closed as “wontfix”.</dd>
</dl>
</li>
<li><dl class="first docutils">
<dt>duplicate</dt>
<dd>Used when another ticket covers the same issue. By closing duplicate
tickets, we keep all the discussion in one place, which helps
everyone.</dd>
</dl>
</li>
<li><dl class="first docutils">
<dt>worksforme</dt>
<dd>Used when the ticket doesn’t contain enough detail to replicate
the original bug.</dd>
</dl>
</li>
<li><dl class="first docutils">
<dt>needsinfo</dt>
<dd>Used when the ticket does not contain enough information to replicate
the reported issue but is potentially still valid. The ticket
should be reopened when more information is supplied.</dd>
</dl>
</li>
</ul>
<p>If you believe that the ticket was closed in error – because you’re
still having the issue, or it’s popped up somewhere else, or the triagers have
made a mistake – please reopen the ticket and provide further information.
Again, please do not reopen tickets that have been marked as “wontfix” and
bring the issue to <a class="reference internal" href="../mailing-lists.html#django-developers-mailing-list"><span class="std std-ref">django-developers</span></a> instead.</p>
</div>
<div class="section" id="s-how-can-i-help-with-triaging">
<span id="s-id3"></span><span id="how-can-i-help-with-triaging"></span><span id="id3"></span><h2>How can I help with triaging?<a class="headerlink" href="#how-can-i-help-with-triaging" title="Permalink to this headline">¶</a></h2>
<p>The triage process is primarily driven by community members. Really,
<strong>ANYONE</strong> can help.</p>
<p>To get involved, start by <a class="reference external" href="https://www.djangoproject.com/accounts/register/">creating an account on Trac</a>. If you have an
account but have forgotten your password, you can reset it using the <a class="reference external" href="https://www.djangoproject.com/accounts/password/reset/">password
reset page</a>.</p>
<p>Then, you can help out by:</p>
<ul class="simple">
<li>Closing “Unreviewed” tickets as “invalid”, “worksforme”, or “duplicate”, or
“wontfix”.</li>
<li>Closing “Unreviewed” tickets as “needsinfo” when the description is too
sparse to be actionable, or when they’re feature requests requiring a
discussion on <a class="reference internal" href="../mailing-lists.html#django-developers-mailing-list"><span class="std std-ref">django-developers</span></a>.</li>
<li>Correcting the “Needs tests”, “Needs documentation”, or “Has patch”
flags for tickets where they are incorrectly set.</li>
<li>Setting the “<a class="reference external" href="https://code.djangoproject.com/query?status=!closed&amp;easy=1">Easy pickings</a>” flag for tickets that are small and
relatively straightforward.</li>
<li>Set the <em>type</em> of tickets that are still uncategorized.</li>
<li>Checking that old tickets are still valid. If a ticket hasn’t seen
any activity in a long time, it’s possible that the problem has been
fixed but the ticket hasn’t yet been closed.</li>
<li>Identifying trends and themes in the tickets. If there are a lot of bug
reports about a particular part of Django, it may indicate we should
consider refactoring that part of the code. If a trend is emerging,
you should raise it for discussion (referencing the relevant tickets)
on <a class="reference internal" href="../mailing-lists.html#django-developers-mailing-list"><span class="std std-ref">django-developers</span></a>.</li>
<li>Verify if patches submitted by other users are correct. If they are correct
and also contain appropriate documentation and tests then move them to the
“Ready for Checkin” stage. If they are not correct then leave a comment to
explain why and set the corresponding flags (“Patch needs improvement”,
“Needs tests” etc.).</li>
</ul>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p>The <a class="reference external" href="https://code.djangoproject.com/wiki/Reports">Reports page</a> contains links to many useful Trac queries, including
several that are useful for triaging tickets and reviewing patches as
suggested above.</p>
<p class="last">You can also find more <a class="reference internal" href="new-contributors.html"><span class="doc">Advice for new contributors</span></a>.</p>
</div>
<p>However, we do ask the following of all general community members working in
the ticket database:</p>
<ul class="simple">
<li>Please <strong>don’t</strong> promote your own tickets to “Ready for checkin”. You
may mark other people’s tickets which you’ve reviewed as “Ready for
checkin”, but you should get at minimum one other community member to
review a patch that you submit.</li>
<li>Please <strong>don’t</strong> reverse a decision without posting a message to
<a class="reference internal" href="../mailing-lists.html#django-developers-mailing-list"><span class="std std-ref">django-developers</span></a> to find consensus.</li>
<li>If you’re unsure if you should be making a change, don’t make the
change but instead leave a comment with your concerns on the ticket,
or post a message to <a class="reference internal" href="../mailing-lists.html#django-developers-mailing-list"><span class="std std-ref">django-developers</span></a>. It’s okay to be unsure,
but your input is still valuable.</li>
</ul>
</div>
<div class="section" id="s-bisecting-a-regression">
<span id="bisecting-a-regression"></span><h2>Bisecting a regression<a class="headerlink" href="#bisecting-a-regression" title="Permalink to this headline">¶</a></h2>
<p>A regression is a bug that’s present in some newer version of Django but not in
an older one. An extremely helpful piece of information is the commit that
introduced the regression. Knowing the commit that caused the change in
behavior helps identify if the change was intentional or if it was an
inadvertent side-effect. Here’s how you can determine this.</p>
<p>Begin by writing a regression test for Django’s test suite for the issue. For
example, we’ll pretend we’re debugging a regression in migrations. After you’ve
written the test and confirmed that it fails on the latest master, put it in a
separate file that you can run standalone. For our example, we’ll pretend we
created <code class="docutils literal notranslate"><span class="pre">tests/migrations/test_regression.py</span></code>, which can be run with:</p>
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$</span> ./runtests.py migrations.test_regression
</pre></div>
</div>
<p>Next, we mark the current point in history as being “bad” since the test fails:</p>
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$</span> git bisect bad
<span class="go">You need to start by &quot;git bisect start&quot;</span>
<span class="go">Do you want me to do it for you [Y/n]? y</span>
</pre></div>
</div>
<p>Now, we need to find a point in git history before the regression was
introduced (i.e. a point where the test passes). Use something like
<code class="docutils literal notranslate"><span class="pre">git</span> <span class="pre">checkout</span> <span class="pre">HEAD~100</span></code> to checkout an earlier revision (100 commits earlier,
in this case). Check if the test fails. If so, mark that point as “bad”
(<code class="docutils literal notranslate"><span class="pre">git</span> <span class="pre">bisect</span> <span class="pre">bad</span></code>), then checkout an earlier revision and recheck. Once you
find a revision where your test passes, mark it as “good”:</p>
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$</span> git bisect good
<span class="go">Bisecting: X revisions left to test after this (roughly Y steps)</span>
<span class="go">...</span>
</pre></div>
</div>
<p>Now we’re ready for the fun part: using <code class="docutils literal notranslate"><span class="pre">git</span> <span class="pre">bisect</span> <span class="pre">run</span></code> to automate the rest
of the process:</p>
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$</span> git bisect run tests/runtests.py migrations.test_regression
</pre></div>
</div>
<p>You should see <code class="docutils literal notranslate"><span class="pre">git</span> <span class="pre">bisect</span></code> use a binary search to automatically checkout
revisions between the good and bad commits until it finds the first “bad”
commit where the test fails.</p>
<p>Now, report your results on the Trac ticket, and please include the regression
test as an attachment. When someone writes a fix for the bug, they’ll already
have your test as a starting point.</p>
</div>
</div>


          </div>
        </div>
      </div>
      
        
          <div class="yui-b" id="sidebar">
            
      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
        <div class="sphinxsidebarwrapper">
  <h3><a href="../../contents.html">Table of Contents</a></h3>
  <ul>
<li><a class="reference internal" href="#">Triaging tickets</a><ul>
<li><a class="reference internal" href="#triage-workflow">Triage workflow</a></li>
<li><a class="reference internal" href="#triage-stages">Triage stages</a><ul>
<li><a class="reference internal" href="#unreviewed">Unreviewed</a></li>
<li><a class="reference internal" href="#accepted">Accepted</a></li>
<li><a class="reference internal" href="#ready-for-checkin">Ready For Checkin</a></li>
<li><a class="reference internal" href="#someday-maybe">Someday/Maybe</a></li>
</ul>
</li>
<li><a class="reference internal" href="#other-triage-attributes">Other triage attributes</a><ul>
<li><a class="reference internal" href="#has-patch">Has patch</a></li>
<li><a class="reference internal" href="#needs-documentation">Needs documentation</a></li>
<li><a class="reference internal" href="#needs-tests">Needs tests</a></li>
<li><a class="reference internal" href="#patch-needs-improvement">Patch needs improvement</a></li>
<li><a class="reference internal" href="#easy-pickings">Easy pickings</a></li>
<li><a class="reference internal" href="#type">Type</a></li>
<li><a class="reference internal" href="#component">Component</a></li>
<li><a class="reference internal" href="#severity">Severity</a></li>
<li><a class="reference internal" href="#version">Version</a></li>
<li><a class="reference internal" href="#ui-ux">UI/UX</a></li>
<li><a class="reference internal" href="#cc">Cc</a></li>
<li><a class="reference internal" href="#keywords">Keywords</a></li>
</ul>
</li>
<li><a class="reference internal" href="#closing-tickets">Closing Tickets</a></li>
<li><a class="reference internal" href="#how-can-i-help-with-triaging">How can I help with triaging?</a></li>
<li><a class="reference internal" href="#bisecting-a-regression">Bisecting a regression</a></li>
</ul>
</li>
</ul>

  <h4>Previous topic</h4>
  <p class="topless"><a href="bugs-and-features.html"
                        title="previous chapter">Reporting bugs and requesting features</a></p>
  <h4>Next topic</h4>
  <p class="topless"><a href="writing-code/index.html"
                        title="next chapter">Writing code</a></p>
  <div role="note" aria-label="source link">
    <h3>This Page</h3>
    <ul class="this-page-menu">
      <li><a href="../../_sources/internals/contributing/triaging-tickets.txt"
            rel="nofollow">Show Source</a></li>
    </ul>
   </div>
<div id="searchbox" style="display: none" role="search">
  <h3>Quick search</h3>
    <div class="searchformwrapper">
    <form class="search" action="../../search.html" method="get">
      <input type="text" name="q" />
      <input type="submit" value="Go" />
      <input type="hidden" name="check_keywords" value="yes" />
      <input type="hidden" name="area" value="default" />
    </form>
    </div>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
        </div>
      </div>
              <h3>Last update:</h3>
              <p class="topless">Mar 04, 2020</p>
          </div>
        
      
    </div>

    <div id="ft">
      <div class="nav">
    &laquo; <a href="bugs-and-features.html" title="Reporting bugs and requesting features">previous</a>
     |
    <a href="../index.html" title="Django internals" accesskey="U">up</a>
   |
    <a href="writing-code/index.html" title="Writing code">next</a> &raquo;</div>
    </div>
  </div>

      <div class="clearer"></div>
    </div>
  </body>
</html>